package jlfm.lastfm.client.impl.simple;

import java.io.InputStream;

import jlfm.lastfm.client.TrackMetadata;
import jlfm.lastfm.client.impl.stream.StreamHandlingException;

public interface StreamHandler {

	/**
	 * 
	 * @param metadata
	 *            the <code>TrackMetadata</code> of the given stream.
	 * @param in
	 *            the <code>InputStream</code> to handle. It contains one full
	 *            track.
	 * @return <tt>true</tt> if next track could be handled otherwise
	 *         <tt>false</tt>.
	 */
	boolean handleStream(TrackMetadata metadata, InputStream in) throws StreamHandlingException;

}
